#ifndef WEBSERVICE_H




#include "lib.h"
#include <Winhttp.h>


//#include "Callback.h"

using namespace std;


class WebService
{
public:
	WebService(const wstring& Server, bool IsSecure, const wstring& Method, const wstring& Headers);	       
	~WebService();

	bool Call(std::wstring& Response, std::wstring sURL, std::string sPostData = "");

	wstring	GetServer() const;
	void	SetServer(const wstring& Server);

	wstring	GetMethod() const;
	void	SetMethod(const wstring& Method);

	string	GetPostData() const;
	void	SetPostData(const string& PostData);

	wstring	GetHeaders() const;
	void	SetHeaders(const wstring& Headers);

private:
	WebService();
	wstring	m_sServer;
	bool	m_bSecure;
	wstring	m_sMethod;
	string	m_sPostData;
	wstring	m_sHeaders;

	HINTERNET conn;
	HINTERNET session;
};

#endif